package com.bitejiuyeke.forum.exception;

import com.bitejiuyeke.forum.common.AppResult;
import lombok.Getter;
import lombok.Setter;

/*
* 自定义异常
* */
@Setter
@Getter
public class ApplicationException extends RuntimeException {


    private AppResult errResult;



    public ApplicationException(AppResult errResult) {
        super(errResult.getMessage());
        this.errResult = errResult;

    }

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message, Throwable cause) {
        super(message, cause);

    }

    public ApplicationException(Throwable cause) {
        super(cause);
    }

}
